import java.sql.Timestamp

case class BusinessLineRow(id: Int, name: String, description: Option[String] = None)

case class ProjectRow(id: Int, name: String, status: Int = 0, businessLineId: Int, lastModifiedTime: java.sql.Timestamp)

case class ProjectJoinBusinessLine(id: Int, name: String, status: Int = 0, businessLineId: Int, lastModifiedTime: java.sql.Timestamp, businessLineRow: Seq[BusinessLineRow])

object ProjectJoinBusinessLine extends App {

  def apply(p: ProjectRow, b: Seq[BusinessLineRow]): ProjectJoinBusinessLine = {
    new ProjectJoinBusinessLine(p.id, p.name, p.status, p.businessLineId, p.lastModifiedTime, b)
  }

  val p = new ProjectRow(5, "企业征信图谱TEST2", 0, 3, new Timestamp(System.currentTimeMillis()))
  val b = new BusinessLineRow(1, "供应链金融风控", Some("主要使用失联修复，疑似关系计算"))

  ProjectJoinBusinessLine(5, "企业征信图谱TEST2", 0, 3, new Timestamp(System.currentTimeMillis()), Seq(b))

  println(ProjectJoinBusinessLine.apply(p, Seq(b)))
}

